@model Rank
@{
    Layout = "~/Views/Shared/_Dashboard.cshtml";
}
@UIHelper.ImageTitle(((Model != null && Model.ID>0) ? Html.Global("RES_NEW") : Html.Global("RES_EDIT")) +" "+Html.Global("forums","Rank"), "", Url.Content("~/content/images/icon_ranks_48.png"))
@using (Html.BeginForm(((Model != null && Model.ID>0) ? "Edit" : "Create"), "Rank", new
{
    Area = "Community",
    id = Model != null ? Model.ID : 0
}, FormMethod.Post))
{
    @Html.AntiForgeryToken() 
    <div style="padding: 10px;">
        @Html.ValidationSummary()
    </div>

    @UIHelper.SectionHeader(Html.Global("RES_DETAIL"))
    <table class="d-field-table">
        <tr>
            <td>
                <div>
                    <label for="Rank_Name">
                        @Html.Global("RES_NAME")</label>
                </div>
            </td>
            <td>
                <div>
                    @Ajax.DnaFor().TextBox(m => m.Name).GetHtml()
                </div>
            </td>
        </tr>
        <tr>
            <td>
                <label for="Rank_MinimumPoint">
                    @Html.Global("forums", "MinimumPosts")
                </label>
            </td>
            <td>
                @Ajax.DnaFor().TextBox(m => m.MinimumPosts).NumericOnly().GetHtml()
            </td>
        </tr>
        <tr>
            <td>
                <label for="RankImage">
                    @Html.Global("forums", "Image")</label>
            </td>
            <td>
                @Ajax.DnaFor().TextBox(m => m.ImageUrl).GetHtml()
            </td>
        </tr>
        <tr>
            <td colspan="2">
                @Ajax.DnaFor().CheckBox(m => m.IsStart, Html.Global("forums","IsStart"), Url.Content("~/content/images/icon_accept_16.png"), Url.Content("~/content/images/icon_block_16.png")).GetHtml()
            </td>
        </tr>
    </table>
    <hr />
    <div style="display: inline-block; float: left;">
        @Ajax.Dna().Button().LocText("RES_CANCEL").ImageIcons(Url.Content("~/content/images/icon_back_16.png")).Click("location=\"" + Url.Action("List", "Rank", new { Area = "Community" }) + "\";").GetHtml()
        @Ajax.Dna().Button().Submit().LocText("RES_SAVE").ImageIcons(Url.Content("~/content/images/icon_save.gif")).GetHtml()
    </div>
}
@if (Model != null && Model.ID > 0)
{
    using (Html.BeginForm("Delete", "Rank", new { Area = "Community", id = Model.ID }, FormMethod.Post))
    {
    <div style="display: inline-block; float: left;">
        @Ajax.Dna().Button().LocText("RES_DELETE").Submit().ImageIcons(Url.Content("~/content/images/icon_delete_16.png")).GetHtml()
    </div>
    }
}
@Html.StartupScripts()
